package com.rockwell.sniffyhunter.utils;

import com.rockwell.sniffyhunter.model.Turner;

public enum TurnerState implements IStateMachine {
	START {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return JOG_INTO_JUNCTION;
		}
	},
	JOG_INTO_JUNCTION {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).jogIntoJunction();
		}
	},
	CHECK_JOG_INTO_JUNCTION_DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).checkJogIntoJunctionDone();
		}
	},
	STOP_JOG_INTO_JUNCTION {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).stopJogIntoJunction();
		}
	},
	MOVE_INTO_JUNCTION {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).moveIntoJunction();
		}
	},
	TURN {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).turn();
		}
	},
	JOG_OUT_OF_JUNCTION {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).jogOutOfJunction();
		}
	},
	CHECK_JOG_OUT_OF_JUNCTION_DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).checkJogOutOfJunctionDone();
		}
	},
	STOP_JOG_OUT_OF_JUNCTION {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).stopJogOutOfJunction();
		}
	},
	MOVE_OUT_OF_JUNCTION {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).moveOutOfJunction();
		}
	},
	CHECK_MOVE_OUT_OF_JUNCTION_DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((Turner)stateObject).checkMoveOutOfJunctionDone();
		}
	},
	DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return START;
		}
	};
}
